import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/giveInfo/queryPageGoodsByGiveInfoId',
    method: 'post',
    data
  })
}
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/giveInfo/deleteGoodsForGiveInfoId',
    method: 'post',
    data
  })
}

/**
 * 按商家添加所有商品
 * @param data
 * @returns {*}
 */
export function addGoodsByBusiness(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/giveInfo/addWelfareGoodsByShopId',
    method: 'post',
    data
  })
}
